/************************************************************************/
/*    Author: Scott Bevin                                               */
/************************************************************************/

#pragma once

#include <list>

#include "Body.h"
#include "XQuadTree\QuadTree.h"
#include "../XFrameworkTypedefsAndDefines.h"

namespace XF
{
	class PhysicsWorld
	{
	private:
		std::list<Body*> mAllBodies;
		QuadTree* mQuadTree;

		void UpdateAllBodies(double dT);

	public:
		PhysicsWorld(float x, float y, float w, float h);
		PhysicsWorld(float x, float y, float w, float h, unsigned int targetQuadDepth, unsigned int targetQuadObjects);
		~PhysicsWorld();

		void Update(double dT);

		Body* CreateBody(XF::Vector3 pos, float radius);
		void RemoveBody(Body* body);
	};
}
